/**
 * There are code generation
 */
package com.neusoft.lohas.modules.ivm.dao.order;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.neusoft.lohas.common.persistence.BaseDao;
import com.neusoft.lohas.common.persistence.Parameter;
import com.neusoft.lohas.modules.ivm.entity.order.Order;
import com.neusoft.lohas.modules.ivm.entity.order.OrderDetailItem;

/**
 * 商品订单DAO接口
 */
@Repository
public class OrderDetailItemDao extends BaseDao<OrderDetailItem> {
	@SuppressWarnings("unchecked")
	public List<OrderDetailItem> findDetailsByOrderId(String orderId) {
		Query query = createQuery("from OrderDetailItem where order.id = :p1 and delFlag = :p2", new Parameter(orderId, Order.DEL_FLAG_NORMAL));
		return query.list();
	}
}
